package nexd.androidutiltest;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.List;

import cn.nexd.framework.error.NexdCrashException;
import cn.nexd.framework.util.Logger;
import cn.nexd.framework.util.PhoneUtil;
import cn.nexd.framework.util.SDCardUtil;

public class MainActivity extends AppCompatActivity {

    private static final String TAG = "MainActivity";
    TextView viewById;
    List<Integer> list;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        viewById = (TextView) findViewById(R.id.text);
        String apiLevel = PhoneUtil.getInstance(this).getAPILevel();
        String s = PhoneUtil.getInstance(this).getDeviceSoftwareVersion();
        String s1 = PhoneUtil.getInstance(this).getMac();

        viewById.setText("apiLevel : " + apiLevel + "\n" + "softwareVersion : " + s + " \n" + "Mac : " + s1);

        try {
            File file = new File(SDCardUtil.getSDCardPath() + "/abc.abc");
            FileInputStream fileOutputStream = new FileInputStream(file);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
            Logger.debug(TAG, "这里是 Catch 捕获的异常");
            NexdCrashException.getInstance().reportException(e);
        }

        list.add(1);


    }
}
